From 0a8346854e56486156268113c4632e6f2545bc93 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 18 Jun 2008 09:39:14 +0100 Subject: [PATCH] ioemu: Disable format auto-probing in monitor command change Format auto-probing of writable images is a security hole. The last known remaining instance is monitor command change. Disable probing there and use raw. This breaks change for images in all other formats. Signed-off-by: Markus Armbruster --- tools/ioemu/monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ioemu/monitor.c b/tools/ioemu/monitor.c index f15a0dd376..50ff243e5d 100644 --- a/tools/ioemu/monitor.c +++ b/tools/ioemu/monitor.c @@ -387,7 +387,7 @@ static void do_change_block(const char *device, const char *filename) } if (eject_device(bs, 0) < 0) return; - bdrv_open(bs, filename, 0); + bdrv_open2(bs, filename, 0, &bdrv_raw); if (bdrv_is_encrypted(bs)) { term_printf("%s is encrypted.\n", device); for(i = 0; i < 3; i++) { -- 2.30.2